//user.js子模块状态管理

const user = {
    //开启命名空间，独立模块
    namespaced:true,
    state:{
        user_data: '' || localStorage.getItem('userData'),
        user_id:'' || localStorage.getItem('ms_userId'),
        user_password:'' || localStorage.getItem('ms_password'),

        new_time: '' || localStorage.getItem('new_time'),
        before_time: '' || localStorage.getItem('before_time'),
        access: '' || localStorage.getItem('access')
    },
    getters:{
        userId: (state) => state.user_id,
        userPassword: (state) => state.user_password,
        userData: (state) => state.user_data,

        newTime: (state) => state.new_time,
        beforeTime: (state) => state.before_time,
        Access: (state) => state.access,
    },
    mutations:{
        // handleUserData:(state,user_data)=>{
        //     state.user_data = user_data;
        // }

    },
    actions:{
    }
}

export default user